﻿using Inaction.Mapping;
using System;

namespace Inaction.Core
{
    public interface IEntity : IChild
    {
        #region 属性
        bool IsNew { get; }
        bool IsDeleted { get; }
        bool IsSelfDirty { get; }
        Guid? PrimaryKey { get; }
        #endregion

        #region 方法
        object GetOldValue(IProperty property);
        void MarkNew();
        void MarkDirty();
        void MarkDeleted();
        bool IsPropertyDirty(IProperty property);
        void SetDefaultValue();
        #endregion
    }
}
